import { request } from "@/utils/service"
import type * as Charts from "./types/charts"

/** 获取填报率汇总情况，包括列表 */
export function getFillingDataApi(day: string) {
  return request<Charts.DayReportFillingSummaryResponseData>({
    url: "stat/fillingSummary",
    method: "get",
    params: {
      date: day
    }
  })
}

/** 人员工时汇总 柱状图*/
export function userReportStatApi(data: Charts.UserReportStatSerachData) {
  return request<Charts.EchartsSimpleLineResponseData>({
    url: "stat/weekBar",
    method: "post",
    data
  })
}

/**用户计划 热力图 */
export function userPlanStatApi(data: Charts.UserReportStatSerachData) {
  return request<Charts.EchartsHeatMapResponseData>({
    url: "stat/plan",
    method: "post",
    data
  })
}
